package com.shiro.demo3.controller;


import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author mafei
 * @since 2021-08-16
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/test")
    @RequiresRoles("role_admin")
    public String test(){
        return "Hello Test";
    }

    @RequestMapping("/test2")
    public String test2(){
        return "Hello Test2";
    }

    @RequestMapping("/login")
    public String login(){
        return "Hello login";
    }
}
